<?php
// 应用公共文件
use think\facade\Cache;

//{:sysconfig('site','site_name')}
if (!function_exists('sysConf')) {
    function sysConf($group)
    {
        if (empty($group)) {
            return '';
        }
        $getSetting = Cache::get('Cache_setting_name');
        if (empty($getSetting)) {
            $setting = (new \app\common\business\Setting())->getSetting($group);
            if (!empty($setting)) {
                Cache::set('Cache_setting_name', $setting);
                return $setting[$group];
            } else {
                return "";
            }
        } else {
            return $getSetting[$group];
        }
    }
}